<?php

namespace common\models\WxDisabledArea;

use Yii;

/**
 * This is the model class for table "wx_disabled_area".
 *
 * @property string $id
 * @property string $city 区域名称
 * @property string $wx_public_id
 */
class WxDisabledAreaBase extends \common\models\CommonModel\CommonModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'wx_disabled_area';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['city', 'wx_public_id'], 'required'],
            [['wx_public_id'], 'integer'],
            [['city'], 'string', 'max' => 100],
            [['wx_public_id', 'city'], 'unique', 'targetAttribute' => ['wx_public_id', 'city']],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'city' => 'City',
            'wx_public_id' => 'Wx Public ID',
        ];
    }
}
